
<?php

//SHOWING TABLES//
$var1 = $_GET[id];

$username="user";
$password="password";
$database="database name";

mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query="SELECT * FROM TABLENAME order by id desc ";
$result=mysql_query($query);

$num=mysql_numrows($result);

mysql_close();

$i=0;
while ($i < $num) {

$id=mysql_result($result,$i,"id");
$title=mysql_result($result,$i,"title");
$description=mysql_result($result,$i,"description");
$date=mysql_result($result,$i,"timestamp");
$country=mysql_result($result,$i,"country");


echo "<body color=7B52AB><b><a href=item_s40.php?id=$id>&nbsp;&bull;&nbsp;$title<br>&nbsp;&nbsp;&nbsp;&ndash;<i>&nbsp;$country</i></a></b>";
// echo "<br>".$date;
echo "<hr>";
echo "</body>";
$i++;
}

?>
